DEFINITION MODULE SimpleIO;
(* Uses the "standard" files input, output, and log which may be manipulated
   by the module StandardIO *)
(*
*    Copyright (c) 1985,1986,1987,1988,1989 by
*    ana-systems, Foster City, California.
*    All Rights Reserved.
*
*    This software is furnished under a license and may be used and copied
*    only  in accordance with  the  terms  of  such  license and  with the
*    inclusion of the above copyright notice.  This software or  any other
*    copies thereof may not be provided or otherwise made available to any
*    other  person.   No title to and ownership of the  software is  herby
*    transferred.
*
*    The information in this software is  subject to change without notice
*    and  should  not be construed as a commitment by ana-systems.   No
*    warranty is implied or expressed.
*
*   SCCID  = "1.2    9/19/86"; 
*)
FROM SYSTEM IMPORT WORD;

EXPORT QUALIFIED
   EOF,       EOT,         EOL,
   ReadChar,  ReadString,  ReadLine,  ReadLn,  ReadInt,  
   ReadCard,  ReadNum,     CondRead,  UndoRead,
   WriteChar, WriteString, WriteLn,   WriteInt, WriteCard,  WriteNum;

PROCEDURE EOF () : BOOLEAN;
PROCEDURE EOT () : BOOLEAN;
PROCEDURE EOL () : BOOLEAN;

PROCEDURE ReadChar   (VAR ch      : CHAR);
PROCEDURE ReadString (VAR str     : ARRAY OF CHAR); (* same as in Text *)
PROCEDURE ReadLine   (VAR line    : ARRAY OF CHAR); (* same as in Text *)
PROCEDURE ReadLn;
PROCEDURE ReadInt    (VAR int     : INTEGER;
                      VAR success : BOOLEAN);
PROCEDURE ReadCard   (VAR card    : CARDINAL;
                      VAR success : BOOLEAN);
PROCEDURE ReadNum    (VAR num     : CARDINAL;
                          base    : CARDINAL (* [2..36] *);
                      VAR success : BOOLEAN);
PROCEDURE CondRead   (VAR ch      : CHAR;
                      VAR success : BOOLEAN);
PROCEDURE UndoRead   ();

PROCEDURE WriteChar  (    ch      : CHAR);
PROCEDURE WriteLn;
PROCEDURE WriteString(VAR str     : ARRAY OF CHAR);
PROCEDURE WriteInt   (    int     : INTEGER;
                          width   : CARDINAL);
PROCEDURE WriteCard  (    card    : CARDINAL;
                          width   : CARDINAL);
PROCEDURE WriteNum   (    num     : CARDINAL;
                          base    : CARDINAL (* [2..36] *);
                          width   : CARDINAL);
END SimpleIO.
